package com.yuanmai.fly3.demo.controllers;

import com.yuanmai.fly3.annotations.Controller;
import com.yuanmai.fly3.annotations.Path;
import com.yuanmai.fly3.annotations.SessionScoped;

import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 * Created by xux on 2017/5/14.
 */
@SessionScoped
@Controller
@Path("/test")
public class TestController {

    @GET
    @Path("/hello")
    public String hello(){
        return "test say hello";
    }

    @GET
    @Path("/a/hello/{id}")
    @Produces(MediaType.TEXT_HTML)
    public String ahello(int id){

        return "test say hello a==>" + id;
    }
}
